import { stringify } from "qs";
import request from "@/utils/request";

export async function BrandList(params) {
  return request(`/project/query`, {
    method: "POST",
    body: {
      ...params
    }
  });
}

export async function removeBrand(params) {
  return request(`/brand/del/${params.code}`, {
    method: "POST",
    body: {}
  });
}

export async function addUser(params) {
  return request("/brand/add", {
    method: "POST",
    body: {
      ...params
    }
  });
}

export async function editUser(params) {
  return request("/brand/edit", {
    method: "POST",
    body: {
      ...params
    }
  });
}

export async function deptQuery(params) {
  return request("/dept/query", {
    method: "POST",
    body: params
  });
}

export async function Detail(params) {
  console.log('desc',params);
  return request(`/project/detail/${params}`, {
    method: "POST",
    body:{}
  });
}
export async function ProjectAudit(params) {
  console.log(params);
  return request("/project/audit", {
    method: "POST",
    body: params
  });
}
export async function packing(params) {
  return request("/project/packing", {
    method: "POST",
    body: {
      ...params
    }
  });
}
export async function edit(params) {
  return request("/project/edit", {
    method: "POST",
    body: {
      ...params
    }
  });
}
export async function merchantList(params) {
  return request("/project/merchant/list", {
    method: "POST",
    body: {
      ...params
    }
  });
}

export async function uploadFile(params) {
  return request("/img/upload", {
    method: "POST",
    headers: { 'Content-Type': 'multipart/form-data' },
    body: params
  });
}

export async function projectUpper(params) {
  return request("/project/upper", {
    method: "POST",
    body: params
  });
}
export async function projectUnder(params) {
  return request("/project/under", {
    method: "POST",
    body: params
  });
}

export async function projectCancel(params) {
  return request("/project/cancel", {
    method: "POST",
    body: params
  });
}

export async function createAfter(params) {
  return request("/project/after/loan/add", {
    method: "POST",
    body: params
  });
}

export async function afterDetail(params) {
  return request(`/project/after/loan/detail/${params}`, {
    method: "POST",
    body:{}
  });
}
export async function projectDel(params) {
  return request(`/project/del/${params.projectNo}`, {
    method: "POST",
    body:{}
  });
}
